package com.yunfangdata.service.impl;

import com.yunfangdata.domain.IdCardPicture;
import com.yunfangdata.mapper.IdCardPictureMapper;
import com.yunfangdata.query.QueryObject;
import com.yunfangdata.service.IIdCardPictureService;
import com.yunfangdata.util.PageResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class IdCardPictureServiceImpl implements IIdCardPictureService {

    @Autowired
    private IdCardPictureMapper mapper;

    public void save(IdCardPicture entity) {
        mapper.insert(entity);
    }

    public void delete(Long id) {
        mapper.deleteByPrimaryKey(id);
    }

    public void update(IdCardPicture entity) {
        mapper.updateByPrimaryKey(entity);
    }

    public IdCardPicture get(Long id) {
        return mapper.selectByPrimaryKey(id);
    }

    public List<IdCardPicture> list() {
        return mapper.selectAll();
    }

    @Override
    public IdCardPicture selectIdCardPictureByStaffId(String staffId) {
        return mapper.selectIdCardPictureByStaffId(staffId);
    }
}
